/**
 * 
 */
package com.onstar.cn.map.core;

import com.onstar.cn.map.core.impl.OGeoPointImpl;

/**
 * @author Qiying Gong
 * 
 * @Created 2013-4-24
 */
public class Rectangle2D {

	private OGeoPoint leftBottom;
	private OGeoPoint rightTop;

	public Rectangle2D(OGeoPoint leftBottom, OGeoPoint rightTop) {
		this.leftBottom = leftBottom;
		this.rightTop = rightTop;
	}

	public Rectangle2D(double startX, double startY, double width, double height) {
		leftBottom = new OGeoPointImpl(startX, startY);
		rightTop = new OGeoPointImpl(startX + width, startY + height);
	}

	/**
	 * @return the leftBottom
	 */
	public OGeoPoint getLeftBottom() {
		return leftBottom;
	}

	/**
	 * @param leftBottom
	 *            the leftBottom to set
	 */
	public void setLeftBottom(OGeoPoint leftBottom) {
		this.leftBottom = leftBottom;
	}

	/**
	 * @return the rightTop
	 */
	public OGeoPoint getRightTop() {
		return rightTop;
	}

	/**
	 * @param rightTop
	 *            the rightTop to set
	 */
	public void setRightTop(OGeoPoint rightTop) {
		this.rightTop = rightTop;
	}

}
